﻿@using GSLMS.Entity.Enum
@model GSLMS.Entity.TB_APP_PROINFO
@{
    Layout = null;
}
<div class="pageContent">
    <form method="post" id="formGProInfo" action="DianDang/BMAudit/gManager/GProInfo?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
    onsubmit="return validateCallback(this, dialogAjaxDone)">
    @Html.ValidationSummary(true)
    <div class="pageFormContent" layouth="50">
        @Html.HiddenFor(model => model.ID)
        <ul>
            <li>立项信息@(Model.STATUS >= 10 ? "已" : "未")保存</li>
            <li>已保存共同借款人@(Model.TraInfoCount)个</li>
            <li>已保存联系人@(Model.ConInfoCount)个</li>
            <li>已保存附件@(Model.FileInfoCount)个</li>
        </ul>
    </div>
    <p style="width: 95%">
        <label>
            意见：</label>
        @Html.TextArea("AuditContent", new { style = "width:100%;height:60px" })
        @Html.Hidden("hidActiondo")
    </p>
    <div class="formBar">
        <ul>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="button" onclick="GProInfoSumbit(1)">
                            同意</button></div>
                </div>
            </li>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="button" onclick="GProInfoSumbit(2)">
                            拒绝</button></div>
                </div>
            </li>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="button" onclick="GProInfoSumbit(3)">
                            退回</button></div>
                </div>
            </li>
        </ul>
    </div>
    </form>
</div>
<script>
    function GProInfoSumbit(action) {
        $form = $("#formGProInfo");
        $("#hidActiondo").val(action);
        if (action > 1) {
            var AuditContent = $form.find("#AuditContent").val();
            if (AuditContent) {
                validateCallback($form, dialogAjaxDone, action== 2 ? "请确认拒绝此笔项目申请?" : "请确认将此项目退回到项目经理?");
            }
            else {
                alertMsg.error("请输入意见!");
            }
        }
        else {
            validateCallback($form, dialogAjaxDone, "确认同意此笔项目申请?");
        }

    }
</script>
